const { createServer } = require('node:http');

const router = require('./router');
const hostname = '127.0.0.1';
const port = 8080;

const server = createServer();

server.on('request', router);

server.listen(port, hostname, () => {
  console.log(`Server running at http://${hostname}:${port}/`);
});
